package xing.application.service.page.dto;

import io.swagger.annotations.ApiModelProperty;
import xing.domain.page.PageTemplate;

import java.util.ArrayList;
import java.util.List;

public class MyTemplate {

    public List<PageTemplate> getList() {
        return list;
    }

    public void setList(List<PageTemplate> list) {
        this.list = list;
    }

    public Long getCount() {
        return count;
    }

    public void setCount(Long count) {
        this.count = count;
    }

    @ApiModelProperty(notes = "模板类型",name="type",required=true,value="0: 临时快照1：官方预定义模板: 2：快照3:当前使用4：自定义模板(发布过的)")
    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }


    private Integer type;
    private Long count;
    private List<PageTemplate> list= new ArrayList<>();

    public MyTemplate(Integer type, Long count) {
        this.type = type;
        this.count = count;
    }

    public boolean equals(Object obj) {
        if (obj instanceof MyTemplate) {
            MyTemplate m = (MyTemplate) obj;
            return this.type.equals(m.type);
        }
        return super.equals(obj);
    }
}
